#include<stdio.h>
int Reada(char a[]);
int Readb(char b[]);
#define N 30
int main()
{	 	   		 	  
    char a[N], b[N];
    int i, j, k = 0, n1, n2, flag = 1;
    n1 = Reada(a);
    n2 = Readb(b);
    for (i = 0; i < (n1 - n2 + 1); i++)
    {	 	   		 	  
        for (j = 0; j < n2; j++)
        {	 	   		 	  
            if (a[i + j] == b[j])
                flag = 1;
            else
            {	 	   		 	  
                flag = 0;
                goto L;
            }
        }
L:
        if (flag)
            k++;
    }
    printf("%d\n", k);
    return 0;
}	 	   		 	  
int Reada(char a[])
{	 	   		 	  
    int i = -1;
    do
    {	 	   		 	  
        i++;
        scanf("%c", &a[i]);
    }
    while (a[i] != '\n');
    return i;
}	 	   		 	  
int Readb(char b[])
{	 	   		 	  
    int i = -1;
    do
    {	 	   		 	  
        i++;
        scanf("%c", &b[i]);
    }
    while (b[i] != '\n');
    return i;
}	 	   